import java.util.Scanner;

public class QQQQ {
    public static void main(String[] args){
        int[] a;
        a=new int[3];
        for(int i=0;i<3;i++){
            Scanner A=new Scanner(System.in);
            a[i]= A.nextInt();
        }
        int X=a[0];
        int Y=a[1];
        int Z=a[2];
        System.out.println((X*X*X)+(Y*Y*Y)+(Z*Z*Z));
    }
}
